package lab1;

import junit.framework.TestCase;

public class LiczbaTest1 extends TestCase {

	Liczba l;
	protected void setUp() throws Exception {
		super.setUp();
		l = new Liczba();
	}

	protected void tearDown() throws Exception {
		super.tearDown();
	}
	
	public void testLiczba1(){
		l.set("FF", 16);
		assertEquals("255", l.get(10));
	}
	
	public void testLiczba2(){
		l.set("111000", 2);
		assertTrue(l.get(8).equals("70"));
	}
	
	public void testLiczba3(){
		l.set("144", 10);
		assertEquals("hello there, error here", "100", l.get(12));
	}
	
	public void testLiczba4(){
		l.set("7F7F", 16);
		if(l.get(2).equals("0111111101111111"))
			return;
		fail();
	}
	
	public void testLiczba5(){
		assertNull(l.get(0));
	}

}
